You are on page 1of 2

PARA HECER INICIOS EN UN PROGRAMA

Private Sub Timer1_Timer()


If ProgressBar1.Value < ProgressBar1.Max Then
ProgressBar1.Value = ProgressBar1.Value + 1
ElseIf ProgressBar1.Value = ProgressBar1.Max Then
Timer1.Enabled = False
Unload Me: Form1.Show
End If
End Sub

PARA CARGAR UNA IMAGEN

Private Sub Command1_Click()


On Error GoTo ehandle
CommonDialog1.ShowOpen 'Abrimos
If CommonDialog1.FileName = "" Then Exit Sub
Cuadros(1).Picture = LoadPicture(CommonDialog1.FileName) 'Cargamos el Picture

Exit Sub

ehandle:
If Err.Number = 481 Then MsgBox "EL archivo que eligi� no es una imagen v�lida":
Exit Sub
End Sub

HACER CIRCULOS DE COLORES

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As


Single)
FillColor = QBColor(Int(Rnd * 15)) ' Elige un valor aleatorio de FillColor.
FillStyle = Int(Rnd * 8) ' Elige un valor aleatorio de FillStyle.
Circle (X, Y), 250 ' Dibuja un c�rculo.
End Sub

PARA SALIR DE UNA APLICACION CON PREGUNTA SI NO NO

Private Sub Command10_Click()


RES = MsgBox("�ESTA SEGURO DE SALIR?()", vbQuestion + vbYesNo, "VENTANA
MENSAJE")
If RES = vbYes Then
End
End If

If RES = vbNo Then


Form1.Show
End If

End Sub

CARGAR UN VIDEO AL REPRODUCTOR

Private Sub Command1_Click()


On Error GoTo ehandle
CommonDialog1.ShowOpen 'Abrimos
If CommonDialog1.FileName = "" Then Exit Sub
WindowsMediaPlayer1.URL = (CommonDialog1.FileName)

Exit Sub

ehandle:
If Err.Number = 481 Then MsgBox "EL archivo que eligi� no es un video": Exit Sub
End Sub

PARA QUE SE VEA BONITO EL FORMULARIO

Private Sub Form_Load()

Skin1.LoadSkin App.Path & "\GT3.skn"


Skin1.ApplySkin Form1.hWnd
Skin1.ApplySkin Form2.hWnd

End Sub

PALETA DE COLORES PARA EL FONDO Y TEXTO

Private Sub adsdsd_Click()


CommonDialog1.ShowColor 'ESTO MUESTRA EL CUADRO DE COLORES PARA QUE EL USUARIO
'ELIJA EL COLOR QUE MAS LE AGRADE PARA LA TINTA DEL LAPIZ
Text1.BackColor = CommonDialog1.Color
End Sub

PARA EL BLOG DE NOTAS

Private Sub MNUBN_Click()


A = Shell("NOTEPAD.EXE", 1)
End Sub

PARA LA CALCULADORA

Private Sub MNUCALC_Click()


X = Shell("CALC.EXE")
End Sub

Imprimir un RichTextBox con su formato original.

Private Sub Command1_Click()


On Error GoTo ErrorDeImpresion
Printer.Print ""
RichTextBox1.SelPrint Printer.hDC
Printer.EndDoc
Exit Sub
ErrorDeImpresion:
Exit Sub
End Sub

You might also like